package cate.game.play.proce.result;


import cate.common.table.d.GDPlay;
import cate.game.play.buff.Buff;
import cate.game.play.vo.BuffVO;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("buff更新结果")
public class BuffUpdateResult extends ActionResult<BuffUpdateResult> {

    @NoteField("buff")
    public BuffVO buff;

    public BuffUpdateResult() {
        this.type = GDPlay.ResultType.BUFF_UPDATE;
    }

    public BuffUpdateResult buffSet(Buff buff) {
        this.pidSet(buff.owner);
        this.buff = new BuffVO();
        this.buff.readFrom(buff);
        return this;
    }

    @Override
    public String toString() {
        return super.toString() + " 更新为" + buff;
    }
}
